home *** CD-ROM | disk | FTP | other *** search
- Exploding Box Windows for TP BGI
-
- ExpBox V1.03
- Written by Michael Day
- as of 14 February 1989
- Copyright 1988 by Michael Day
-
- This version is released to the public domain by the author as of
- 14 February 1989
-
-
- ExpBox V1.03 explodes a box on the display using BGI
- routines. You can define the final box area, how many steps in
- the explosion, the speed of the explosion, and where to explode
- from. You can also define the color and pattern of the exploding
- box. You can optionally specify rectangles to follow the
- explosion to add a bit more flash to the explosion. The color of
- the rectangles can be separately defined. And just for fun you
- can even specify sound effects.
-
- There is one basic procedure call to generate the exploding
- box "ExplodeBox". The procedure call contains all the information
- needed to generate the exploding box.
-
- Example:
-
- ExplodeBox(x1,y1,x2,y2:integer;
- Step,Speed,Style:word;
- Color,Pattern,RColor:byte);
-
- The parameters "x1,y1,x2,y2" define the final area that the
- exploding box will occupy. "Step" specifies how many explosion
- steps are to be used. "Speed" specifies how much delay to place
- between each explosion step in milliseconds. "Style" specifies
- how the explosion is to occur (we will discuss this later).
- "Color" is the color of the box that will explode on the screen.
- "Pattern" is the background pattern that is to be used for the
- exploding box, and RColor is the color to use for the special
- effects rectangles if they are used.
-
- Style:
-
- Bits 0-3 of the Style word control how the box will be exploded
- onto the screen. The possible explosion patterns are as follows:
-
- 0=explode from center
- 1=explode from top
- 2=explode from bottom
- 3=explode from left
- 4=explode from right
- 5=explode from top left corner
- 6=explode bot left corner
- 7=explode top right corner
- 8=explode from bottom right corner
- 9 and Above = no explode
-
- Rectangles:
-
- In addition to the box being exploded, you can add
- rectangles inside the box during the explosion. This helps to
- make it look like there is more action going on. Bits 5,6, and 7
- of the Style word control the number of rectangles that will be
- displayed inside the exploding box.
-
- 0 ($00) = No rectangles displayed
- 1 ($20) = One Rectangle displayed
- 2 ($40) = Two Rectangles displayed
- 3 ($60) = Three Rectangles displayed
- 4 ($80) = Four Rectangles displayed
- 5 ($A0) = Five Rectangles displayed
- 6 ($C0) = Six Rectangles displayed
- 7 ($E0) = Seven Rectangles displayed
-
- The rectangles are staggered one inside the other inside the
- exploding box.
-
-
- Sound:
- Bit 4 of the Style word controls the sound action. If bit 4
- is one, then sound will be added to the explosion. If bit4 is
- off, then no sound is used.
-
-
- Step:
- The Step parameter controls how many steps will be used to
- explode the box. If Step is zero, then no explosion will occur.
- The box will be drawn in one single action. Large step values
- should be avoided since they will seriously slow down the
- box explosion.
-
- Speed:
- The Speed parameter controls the speed of the explosion.
- This is done by inserting the specified delay between each step
- of the explosion. The speed is specified in milliseconds.
-
-
- Color:
- Pattern:
- The Color and Pattern parameters control the color and
- pattern that is used to drawn the box while it is being exploded.
-
-
- RColor:
- If the rectangles are added to the exploding box, then the
- value passed in RColor will control the color of the rectangles.
-
-
- <eof>